<template>
    <div class="qilin-QilinUtils" ref="QilinUtilsRef">
        <div style="background-color:#fff;padding:12px;margin-bottom:20px;border-radius:5px;">
            <div class="header">
                通过npm安装
            </div>
            <CodeMirror codeValue="npm install qilin-utils"></CodeMirror><br>
            <div class="header">项目中引用</div>
            <CodeMirror codeValue="import Qilin from 'qilin-utils';"></CodeMirror>
        </div>
        <template v-for="item in QilinUtilsJS">
            <QilinCard v-model:cardConfig="item.cardConfig">
                <QilinCollapse v-model:collapseConfig="item.collapseConfig">
                    <template v-slot:code="data">
                        <CodeMirror v-if="!!data.data" :codeValue="data.data"></CodeMirror>
                    </template>
                </QilinCollapse>
            </QilinCard>
        </template>
        <div class="qilin-QilinUtils-operate">
            <el-button icon="Upload" type="primary" size="default" circle @click="scrollPage('top')"></el-button>
            <el-button icon="Top" type="primary" size="default" circle @click="scrollPage1('top')"></el-button>
            <el-button icon="Download" type="primary" size="default" circle @click="scrollPage('bottom')"></el-button>
            <el-button icon="Bottom" type="primary" size="default" circle @click="scrollPage1('bottom')"></el-button>
        </div>
    </div>
</template>

<script setup>
import Qilin from "qilin-utils";

/*
    数据变量定义区域
*/
// 获取当前元素DOM
const QilinUtilsRef=ref(null);
// QilinUtils数据集
const QilinUtilsJS=reactive([
    {
        cardConfig:{
            title:"Qilin工具库Number方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"判断是否是数字:",
                    expression:"Qilin.Number.isNumber(number)",
                    subText:"判断是否是数字",
                    description:"返回true表示传入参数为数字，返回false则表示传入参数并非数字",
                    codeValue:`
                        console.log(Qilin.Number.isNumber(777)); //true
                        console.log(Qilin.Number.isNumber("777")); //false
                        console.log(Qilin.Number.isNumber("我是你爹")); //false
                    `
                },
                {
                    text:"判断是否是小数:",
                    expression:"Qilin.Number.isDecimal(number)",
                    subText:"判断是否是小数",
                    description:"返回true则表示传入数字为小数，返回false则不是",
                    codeValue:`
                        console.log(Qilin.Number.isDecimal(3.1415926)); //true
                    `
                },
                {
                    text:"判断数字是否为奇数:",
                    expression:"Qilin.Number.isOdd(number)",
                    subText:"判断是否是奇数",
                    description:"返回true则表示传入数字为奇数，返回false则不是",
                    codeValue:`
                        console.log(Qilin.Number.isOdd(1)); //true
                        console.log(Qilin.Number.isOdd(2)); //false
                        console.log(Qilin.Number.isOdd(1.23)); //true
                    `
                },
                {
                    text:"判断数字是否为偶数:",
                    expression:"Qilin.Number.isEven(number)",
                    subText:"判断是否是偶数",
                    description:"返回true则表示传入数字为偶数，返回false则不是",
                    codeValue:`
                        console.log(Qilin.Number.isEven(1)); //false
                        console.log(Qilin.Number.isEven(2)); //true
                        console.log(Qilin.Number.isEven(1.23)); //true
                    `
                },
                {
                    text:"数字千位格式化:",
                    expression:"Qilin.Number.formatNumber(number)",
                    subText:"数字格式化",
                    description:"对传入的数字进行每隔三位就以,隔开展示，仅对整数有效",
                    codeValue:`
                        console.log(Qilin.Number.formatNumber(3.1415926)); //3.1415926
                        console.log(Qilin.Number.formatNumber(564687956)); //564,687,956
                    `
                },
                {
                    text:"多个数字加法运算:",
                    expression:"Qilin.Number.addNumber(number)",
                    subText:"多个数字的加法运算",
                    description:"对两个数字或多个数字进行加法运算，若不传参数则返回false",
                    codeValue:`
                        console.log(Qilin.Number.addNumber(1,2.2,3)); //6.2
                        console.log(Qilin.Number.addNumber(5.43,6.37)); //11.8
                        console.log(Qilin.Number.addNumber(5)); //5
                        console.log(Qilin.Number.addNumber()); //false
                        console.log(Qilin.Number.addNumber(-2.13,-3)); //-5.13
                    `
                },
                {
                    text:"多个数字减法运算:",
                    expression:"Qilin.Number.minusNumber(number)",
                    subText:"多个数字的减法运算",
                    description:"对两个数字或多个数字进行减法运算，若不传参数则返回false",
                    codeValue:`
                        console.log(Qilin.Number.minusNumber(5,6)); //-1
                        console.log(Qilin.Number.minusNumber(54,6)); //48
                        console.log(Qilin.Number.minusNumber(5)); //5
                        console.log(Qilin.Number.minusNumber()); //false
                        console.log(Qilin.Number.minusNumber(-1.2,-2.4)); //1.2
                        console.log(Qilin.Number.minusNumber(3,4,5,6)); //-12
                    `
                },
                {
                    text:"多个数字乘法运算:",
                    expression:"Qilin.Number.multiplyNumber(number)",
                    subText:"多个数字的乘法运算",
                    description:"对两个数字或多个数字进行乘法运算，若不传参数则返回false",
                    codeValue:`
                        console.log(Qilin.Number.multiplyNumber(2,2.5)); //5
                        console.log(Qilin.Number.multiplyNumber(-2,2.5)); //-5
                        console.log(Qilin.Number.multiplyNumber(-2,-2.5)); //5
                        console.log(Qilin.Number.multiplyNumber(1,2,3,4)); //25
                        console.log(Qilin.Number.multiplyNumber(1)); //1
                        console.log(Qilin.Number.multiplyNumber()); //false
                    `
                },
                {
                    text:"多个数字除法运算:",
                    expression:"Qilin.Number.divideNumber(number)",
                    subText:"多个数字的除法运算",
                    description:"对两个数字或多个数字进行除法运算，若不传参数则返回false",
                    codeValue:`
                        console.log(Qilin.Number.divideNumber(5,2)); //2.5
                        console.log(Qilin.Number.divideNumber(-2,1)); //-2
                        console.log(Qilin.Number.divideNumber(-2,-1)); //2
                        console.log(Qilin.Number.divideNumber(100,2,10,7)); //0.7142857142857143
                        console.log(Qilin.Number.divideNumber(100)); //100
                        console.log(Qilin.Number.divideNumber()); //false
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库String方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"字符串插入操作:",
                    expression:"Qilin.String.insertString(string,string,number|null)",
                    subText:"向字符串的指定位置插入字符串",
                    codeValue:`
                        console.log(Qilin.String.insertString("我是","你爹",1)); //我你爹是
                        console.log(Qilin.String.insertString("我是","你爹")); //我是你爹
                        console.log(Qilin.String.insertString("让我们荡起双桨","你来",3)); //让我们你来荡起双桨
                    `
                },
                {
                    text:"字符串删除操作:",
                    expression:"Qilin.String.deleteString(string,number|null,number|null)",
                    subText:"删除指定位置的字符串",
                    codeValue:`
                        console.log(Qilin.String.deleteString("我爱中国",2,1)); //我爱国
                        console.log(Qilin.String.deleteString("我爱中国",2,0)); //我爱中国
                        console.log(Qilin.String.deleteString("我爱中国")); //我爱中国
                        console.log(Qilin.String.deleteString("我爱中国",null)); //我爱中国
                        console.log(Qilin.String.deleteString("我爱中国",null,null)); //我爱中国
                    `
                },
                {
                    text:"字符串替换操作:",
                    expression:"Qilin.String.replaceString(string,number,number,string)",
                    subText:"替换指定位置的字符串",
                    codeValue:`
                        console.log(Qilin.String.replaceString("我爱我的中国",2,4,"大")); //我爱大中国
                        console.log(Qilin.String.replaceString("我爱我的中国",4,6,"老婆")); //我爱我的老婆
                    `
                },
                {
                    text:"去除字符串空格操作:",
                    expression:"Qilin.String.trimString(string,boolean)",
                    subText:"去除字符串中的空格",
                    codeValue:`
                        console.log(Qilin.String.trimString("  wos shi ni die  ")); //wos shi ni die
                        console.log(Qilin.String.trimString("  wos shi ni die  ",true)); //wosshinidie
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Date方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"获取指定日期前N个月的日期:",
                    expression:"Qilin.Date.getPrevMonths(date,num)",
                    subText:"获取前N个月的日期，包含本月",
                    codeValue:`
                        console.log(Qilin.Date.getPrevMonths("2022-08-02",0));
                        console.log(Qilin.Date.getPrevMonths("2022-08-02",1));
                        console.log(Qilin.Date.getPrevMonths("2022-08-02",2));
                        console.log(Qilin.Date.getPrevMonths("2022-08-02",3));
                        console.log(Qilin.Date.getPrevMonths());
                        console.log(Qilin.Date.getPrevMonths("2022-01-01",2));
                        console.log(Qilin.Date.getPrevMonths(new Date(),2));
                    `
                },
                {
                    text:"获取指定日期后N个月的日期:",
                    expression:"Qilin.Date.getNextMonths(date,num)",
                    subText:"获取后N个月后的日期，包含本月",
                    codeValue:`
                        console.log(Qilin.Date.getNextMonths("2022-08-02",0));
                        console.log(Qilin.Date.getNextMonths("2022-08-02",1));
                        console.log(Qilin.Date.getNextMonths("2022-08-02",2));
                        console.log(Qilin.Date.getNextMonths("2022-08-02",3));
                        console.log(Qilin.Date.getNextMonths());
                        console.log(Qilin.Date.getNextMonths("2022-12-12",3));
                        console.log(Qilin.Date.getNextMonths(new Date(),3));
                    `
                },
                {
                    text:"获取指定天数后的日期:",
                    expression:"Qilin.Date.getDateAfterDays(date,num)",
                    subText:"获取指定天数后的日期",
                    codeValue:`
                        console.log(Qilin.Date.getDateAfterDays(new Date(),3)); //Fri Feb 24 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateAfterDays("2022-12-12",3)); //Thu Dec 15 2022 08:00:00 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateAfterDays(new Date("2022-12-12"),3)); //Thu Dec 15 2022 08:00:00 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateAfterDays(new Date(),-1)); //Mon Feb 20 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateAfterDays(new Date(),0)); //Tue Feb 21 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateAfterDays(new Date(),"222")); //Tue Feb 21 2023 09:48:24 GMT+0800 (中国标准时间)
                    `
                },
                {
                    text:"获取指定天数前的日期:",
                    expression:"Qilin.Date.getDateBeforeDays(date,num)",
                    subText:"获取指定天数前的日期",
                    codeValue:`
                        console.log(Qilin.Date.getDateBeforeDays(new Date(),3)); //Sat Feb 18 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateBeforeDays("2022-12-12",3)); //Fri Dec 09 2022 08:00:00 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateBeforeDays(new Date("2022-12-12"),3)); //Fri Dec 09 2022 08:00:00 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateBeforeDays(new Date(),-1)); //Wed Feb 22 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateBeforeDays(new Date(),-12)); //Sun Mar 05 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateBeforeDays(new Date(),0)); //Tue Feb 21 2023 09:48:24 GMT+0800 (中国标准时间)
                        console.log(Qilin.Date.getDateBeforeDays(new Date(),"222")); //Tue Feb 21 2023 09:48:24 GMT+0800 (中国标准时间)
                    `
                },
                {
                    text:"获取某年的某个月的总天数:",
                    expression:"Qilin.Date.getDays(year,month)",
                    subText:"获取某年的某个月的总天数",
                    codeValue:`
                        console.log(Qilin.Date.getDays(2022,8)); //31
                        console.log(Qilin.Date.getDays(2022,13)); //31
                        console.log(Qilin.Date.getDays(2022,14)); //28
                        console.log(Qilin.Date.getDays(2023,2)); // 28
                    `
                },
                {
                    text:"获取指定格式的日期:",
                    expression:"Qilin.Date.formatDate(date,type)",
                    subText:"date 日期，不传默认当前日期；type 格式类型，不传默认为yyyy-MM-dd hh:mm:ss格式",
                    description:"返回指定格式的日期",
                    codeValue:`
                        console.log(Qilin.Date.formatDate()); //2023-02-21 09:48:24
                        console.log(Qilin.Date.formatDate("2021/12/12")); //2021-12-12 00:00:00
                        console.log(Qilin.Date.formatDate("2021/12/12","yyyy-MM-dd")); //2021-12-12
                        console.log(Qilin.Date.formatDate(new Date("2022/02/25"))); //2022-02-25 00:00:00
                        console.log(Qilin.Date.formatDate(new Date("2022/02/25"),"chinese")); //2022年02月25日
                        console.log(Qilin.Date.formatDate("2021/12/12","chinese")); //2021年12月12日
                        console.log(Qilin.Date.formatDate("2021/12/12","chinese hh:mm")); //2021年12月12日 00:00
                        console.log(Qilin.Date.formatDate("2021/12/12","chinese hh:mm:ss")); //2021年12月12日 00:00:00
                    `
                },
                {
                    text:"判断传入参数日期的大小",
                    expression:"Qilin.Date.compareDate(startDate,endDate)",
                    subText:"返回true表示结束日期大于开始日期，false表示结束日期小于等于开始日期",
                    codeValue:`
                        console.log(Qilin.Date.compareDate("2023/05/15","2023/05/16")); //true
                        console.log(Qilin.Date.compareDate("2023-05-15","2023/05/16")); //true
                        console.log(Qilin.Date.compareDate("2023-05-15 17:30:02","2023-05-15 17:30:01")); //false
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Platform方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"获取终端设备的语言类型:",
                    expression:"Qilin.Platform.getLanguage()",
                    subText:"获取终端设备的语言类型",
                    codeValue:`
                        console.log(Qilin.Platform.getLanguage()); //zh-CN
                    `
                },
                {
                    text:"获取终端设备类型:",
                    expression:"Qilin.Platform.getDevice()",
                    subText:"获取访问终端设备的类型信息，返回一个对象",
                    codeValue:`
                        console.log(Qilin.Platform.getDevice());
                    `
                },
                {
                    text:"获取浏览器类型:",
                    expression:"Qilin.Platform.getBrowser()",
                    subText:"获取浏览器的类型信息，返回一个对象",
                    codeValue:`
                        console.log(Qilin.Platform.getBrowser());
                    `
                },
                {
                    text:"获取浏览器内核信息:",
                    expression:"Qilin.Platform.getBrowserKernel()",
                    subText:"获取浏览器内核信息",
                    codeValue:`
                        console.log(Qilin.Platform.getBrowserKernel()); //webkit
                    `
                },
                {
                    text:"获取操作系统信息:",
                    expression:"Qilin.Platform.getOperatingSystem()",
                    subText:"获取操作系统信息，返回一个对象",
                    codeValue:`
                        console.log(Qilin.Platform.getOperatingSystem());
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Storage方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"获取当前cookie的键值对信息:",
                    expression:"Qilin.Storage.getKeyValueCookie()",
                    subText:"获取当前cookie中的所有键值对信息，并以数组对象形式返回",
                    codeValue:`
                        console.log(Qilin.Storage.getKeyValueCookie());
                    `
                },
                {
                    text:"获取当前cookie的指定key值的value值:",
                    expression:"Qilin.Storage.getValueCookie(keyName,length)",
                    subText:"获取当前cookie中指定key值的value，若有则返回该value，无则返回null",
                    description:"length表示分隔符长度，默认分隔符为=，所以长度为1",
                    codeValue:`
                        console.log(Qilin.Storage.getValueCookie("x-token"));
                        console.log(Qilin.Storage.getValueCookie("111"));
                        console.log(Qilin.Storage.getValueCookie(""));
                        console.log(Qilin.Storage.getValueCookie());
                    `
                },
                {
                    text:"获取当前localStorage中指定key值的value:",
                    expression:"Qilin.Storage.getValueLocalStorage(keyName)",
                    subText:"获取当前localStorage中指定key值的value，若有则返回value，无则返回null",
                    description:"不传参数则查询所有localStorage值",
                    codeValue:`
                        console.log(Qilin.Storage.getValueLocalStorage());
                    `
                },
                {
                    text:"设置当前localStorage中的key-value值:",
                    expression:"Qilin.Storage.setKeyValueLocalStorage(keyName,value)",
                    subText:"设置当前localStorage中的key-value值，无返回值",
                    codeValue:`
                        Qilin.Storage.setKeyValueLocalStorage("EG","M");
                    `
                },
                {
                    text:"删除指定的localStorage或者删除所有Storage:",
                    expression:"Qilin.Storage.removeKeyLocalStorage(keyName,clearType)",
                    subText:"删除指定的localStorage或者删除所有Storage，无返回值",
                    codeValue:`
                        Qilin.Storage.removeKeyLocalStorage("EG");
                    `
                },
                {
                    text:"获取当前sessionStorage中指定key值的value:",
                    expression:"Qilin.Storage.getValueSessionStorage(keyName)",
                    subText:"获取当前sessionStorage中指定key值的value，若有则返回value，无则返回null",
                    description:"不传参数则查询所有sessionStorage值",
                    codeValue:`
                        sessionStorage.setItem("EDG","QIlin");
                        console.log(Qilin.Storage.getValueSessionStorage());
                    `
                },
                {
                    text:"设置当前sessionStorage中的key-value值:",
                    expression:"Qilin.Storage.setKeyValueSessionStorage(keyName,value)",
                    subText:"设置当前sessionStorage中的key-value值，无返回值",
                    codeValue:`
                        Qilin.Storage.setKeyValueSessionStorage("EDG1","222");
                    `
                },
                {
                    text:"删除指定的sessionStorage或者删除所有Storage:",
                    expression:"Qilin.Storage.removeKeySessionStorage(keyName,clearType)",
                    subText:"删除指定的sessionStorage或者删除所有Storage，无返回值",
                    codeValue:`
                        Qilin.Storage.removeKeySessionStorage();
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库File方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"根据文件获取可预览的文件路径:",
                    expression:"$Qilin.File.getFileUrl(file)",
                    subText:"若是图片文件则可直接复制其预览，若是excel文件则会默认下载",
                    codeValue:`
                        // html
                        <el-upload
                            action="#" ref="upload"
                            name="配合实现导入功能，该元素隐藏即可"
                            :auto-upload="false"
                            :list-type="'picture-card'"
                            :on-change="changeUpload"
                        >
                            <i slot="default" class="el-icon-plus"></i>
                        </el-upload>
                        // js
                        changeUpload(file,fileList){
                            console.log(Qilin.File.getFileUrl(file.raw));
                        }
                    `
                },
                {
                    text:"将File对象转为Base64格式的字符:",
                    expression:"$Qilin.File.getFileBase64(file)",
                    subText:"将File对象转为Base64格式的字符串，返回Promise的对象",
                    description:"若是图片文件则可直接复制其预览，若是excel文件则会默认下载",
                    codeValue:`
                        changeUpload(file,fileList){
                            Qilin.File.getFileBase64(file.raw).then((data)=>{
                                console.log(Qilin.File.getBase64File(data,"qilin"));
                            }).catch((err)=>{
                                console.log(err);
                            });
                        }
                    `
                },
                {
                    text:"将Base64格式字符串文件转换为File对象:",
                    expression:"$Qilin.File.getBase64File(base64String,fileName)",
                    subText:"将Base64格式字符串文件转换为File对象",
                    codeValue:`
                        changeUpload(file,fileList){
                            Qilin.File.getFileBase64(file.raw).then((data)=>{
                                console.log(Qilin.File.getBase64File(data,"qilin"));
                            }).catch((err)=>{
                                console.log(err);
                            });
                        }
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Element方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"判断传入的参数是否是元素节点:",
                    expression:"Qilin.Element.isElement(element)",
                    subText:"判断传入的参数是否是元素节点，返回布尔值",
                    codeValue:`
                        const element=this.$refs["upload"].$el;
                        console.log(element);
                        console.log(Qilin.Element.isElement(window));
                        console.log(Qilin.Element.isElement(element));
                        console.log(Qilin.Element.isElement(2));
                        const parentNode=this.$refs["parent"];
                        const childNodeA=this.$refs["childA"];
                        const childNodeB=this.$refs["childB"];
                    `
                },
                {
                    text:"判断某个节点是否包含指定节点:",
                    expression:"Qilin.Element.isContains(parentNode,childNode)",
                    subText:"判断某个节点是否包含指定节点--可以是父子祖孙关系亦可是相等关系",
                    description:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Element.isContains(parentNode,childNodeA));
                        console.log(Qilin.Element.isContains(parentNode,childNodeB));
                        console.log(Qilin.Element.isContains(childNodeA,childNodeB));
                    `
                },
                {
                    text:"判断某个节点是否是指定节点的父节点:",
                    expression:"Qilin.Element.isParentNode(parentNode,childNode)",
                    subText:"判断某个节点是否是指定节点的父节点",
                    description:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Element.isParentNode(parentNode,childNodeA));
                        console.log(Qilin.Element.isParentNode(parentNode,childNodeB));
                        console.log(Qilin.Element.isParentNode(childNodeA,childNodeB));
                    `
                },
                {
                    text:"移除某个元素的指定类名:",
                    expression:"Qilin.Element.removeClass(element,className)",
                    subText:"移除某个元素的指定类名,className可以是一个或多个（以英文逗号隔开）的字符串",
                    description:"无返回值",
                    codeValue:`
                        Qilin.Element.removeClass(parentNode,"a");
                        Qilin.Element.removeClass(parentNode,"a,c");
                        Qilin.Element.removeClass(parentNode,"e");
                        Qilin.Element.removeClass(childNodeB,"EDGQilin");
                        Qilin.Element.removeClass(childNodeB,"EDGQilin,color");
                    `
                },
                {
                    text:"给某个元素添加指定类名:",
                    expression:"Qilin.Element.addClass(element,className)",
                    subText:"给某个元素添加指定类名,className可以是一个或多个（以英文逗号隔开）的字符串",
                    description:"无返回值",
                    codeValue:`
                        Qilin.Element.addClass(parentNode,"e");
                        Qilin.Element.addClass(parentNode,"e,f");
                    `
                },
                {
                    text:"判断某个元素是否包含指定类名:",
                    expression:"Qilin.Element.hasClass(element,className)",
                    subText:"给某个元素添加指定类名,className可以是一个或多个（以英文逗号隔开）的字符串",
                    description:"返回布尔值，若传入多个类名，但凡有一个不包含就返回false",
                    codeValue:`
                        console.log(Qilin.Element.hasClass(parentNode,"c,d"));
                        console.log(Qilin.Element.hasClass(parentNode,"a"));
                        console.log(Qilin.Element.hasClass(parentNode,"b"));
                        console.log(Qilin.Element.hasClass(parentNode,"a,b"));
                    `
                },
                {
                    text:"判断选择器字符串是哪种类型的选择器:",
                    expression:"Qilin.Element.getCssSelector(selector)",
                    subText:"返回对象--包含选择器类型和选择器值",
                    codeValue:`
                        console.log(Qilin.Element.getCssSelector(".EDGQilin"));
                        console.log(Qilin.Element.getCssSelector("[data-value]"));
                        console.log(Qilin.Element.getCssSelector("[data-value='1']"));
                    `
                },
                {
                    text:"获取某个元素距离指定祖先元素上下左右的距离:",
                    expression:"Qilin.Element.getNodeDistance(element,parentNode)",
                    subText:"获取元素距离指定祖先元素上下左右的距离--包含滚动条的距离,元素需要设置其相对或绝对定位",
                    description:"返回对象-包含各个方向的距离",
                    codeValue:`
                        console.log(Qilin.Element.getNodeDistance(childNodeA,parentNode));
                        console.log(Qilin.Element.getNodeDistance(childNodeB,parentNode));
                        console.log(Qilin.Element.getNodeDistance(childNodeA));
                        console.log(Qilin.Element.getNodeDistance(childNodeB));
                        console.log(Qilin.Element.getNodeDistance(childNodeA,childNodeB));
                        console.log(Qilin.Element.getNodeDistance(childNodeB,childNodeA));
                        console.log(Qilin.Element.getNodeDistance(childNodeB,document.body));
                    `
                },
                {
                    text:"获取某个元素节点下指定选择器的子元素节点:",
                    expression:"Qilin.Element.getChildNode(element,selector)",
                    subText:"selector 支持多选择器，等同于querySelectorAll的参数-不传默认查全部",
                    description:"返回包含子元素节点的数组",
                    codeValue:`
                        console.log(Qilin.Element.getChildNode(parentNode,"p"));
                        console.log(Qilin.Element.getChildNode(parentNode,".EDGQilin"));
                        console.log(Qilin.Element.getChildNode(parentNode,"[data-value]"));
                        console.log(Qilin.Element.getChildNode(parentNode,"[data-value='1']"));
                    `
                },
                {
                    text:"获取某个元素节点指定选择器的兄弟元素节点:",
                    expression:"Qilin.Element.getSiblingNode(element,selector)",
                    subText:"selector 支持多选择器，等同于querySelectorAll的参数-不传默认查全部",
                    description:"返回包含兄弟元素节点的数组",
                    codeValue:`
                        console.log(Qilin.Element.getSiblingNode(parentNode,"div"));
                        console.log(Qilin.Element.getSiblingNode(parentNode));
                        console.log(Qilin.Element.getSiblingNode(childNodeA,"p"));
                        console.log(Qilin.Element.getSiblingNode(childNodeB,"p"));
                        console.log(Qilin.Element.getSiblingNode(childNodeB));
                    `
                },
                {
                    text:"获取某个元素的指定样式:",
                    expression:"Qilin.Element.getNodeCssStyle(element,cssName)",
                    subText:"返回样式值",
                    codeValue:`
                        console.log(Qilin.Element.getNodeCssStyle(parentNode,"position"))
                        console.log(Qilin.Element.getNodeCssStyle(parentNode,"font-size"))
                        console.log(Qilin.Element.getNodeCssStyle(parentNode,"color"))
                        console.log(Qilin.Element.getNodeCssStyle(childNodeA,"font-weight"))
                    `
                },
                {
                    text:"将rem单位转换为px单位:",
                    expression:"Qilin.Element.remToPx(rem)",
                    subText:"返回单位数值",
                    codeValue:`
                        console.log(Qilin.Element.remToPx(1));
                        console.log(Qilin.Element.remToPx(2));
                        console.log(Qilin.Element.remToPx());
                    `
                },
                {
                    text:"将px单位转换位rem单位:",
                    expression:"Qilin.Element.pxToRem(px)",
                    subText:"返回单位数值",
                    codeValue:`
                        console.log(Qilin.Element.pxToRem(14));
                        console.log(Qilin.Element.pxToRem(16));
                        console.log(Qilin.Element.pxToRem());
                    `
                },
                {
                    text:"将字符串类型的DOM转换为DOM元素节点:",
                    expression:"Qilin.Element.stringToDom(HTMLString)",
                    subText:"返回DOM元素节点或者包含DOM元素节点的DOM节点数组",
                    codeValue:`
                        console.log(Qilin.Element.stringToDom("<span>我是你爹</span>"));
                        console.log(Qilin.Element.stringToDom("<span>我是你爹</span><span>我才是你爹</span>"));
                    `
                },
                {
                    text:"获取某个元素的内容宽度:",
                    expression:"Qilin.Element.getNodeContentWidth(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是body元素",
                    description:"返回内容宽度值",
                    codeValue:`
                        console.log(Qilin.Element.getNodeContentWidth());
                        console.log(Qilin.Element.getNodeContentWidth(parentNode));
                        console.log(Qilin.Element.getNodeContentWidth(childNodeA));
                        console.log(Qilin.Element.getNodeContentWidth(childNodeB));
                        console.log(Qilin.Element.getNodeContentWidth(".EDGQilin"));
                        console.log(Qilin.Element.getNodeContentWidth("[data-value]"));
                        console.log(Qilin.Element.getNodeContentWidth("[data-value='1']"));
                    `
                },
                {
                    text:"获取某个元素的内容高度:",
                    expression:"Qilin.Element.getNodeContentHeight(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是body元素",
                    description:"返回内容高度值",
                    codeValue:`
                        console.log(Qilin.Element.getNodeContentHeight());
                        console.log(Qilin.Element.getNodeContentHeight(parentNode));
                        console.log(Qilin.Element.getNodeContentHeight(childNodeA));
                        console.log(Qilin.Element.getNodeContentHeight(childNodeB));
                        console.log(Qilin.Element.getNodeContentHeight(".EDGQilin"));
                        console.log(Qilin.Element.getNodeContentHeight("[data-value]"));
                        console.log(Qilin.Element.getNodeContentHeight("[data-value='1']"));
                    `
                },
                {
                    text:"获取某个元素的总宽度:",
                    expression:"Qilin.Element.getNodeWidth(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认表示整个页面文档",
                    description:"返回元素总宽度值",
                    codeValue:`
                        console.log(Qilin.Element.getNodeWidth(parentNode));
                        console.log(Qilin.Element.getNodeWidth());
                        console.log(Qilin.Element.getNodeWidth(".a"));
                        console.log(Qilin.Element.getNodeWidth(".EDGQilin"));
                    `
                },
                {
                    text:"获取某个元素的总高度:",
                    expression:"Qilin.Element.getNodeHeight(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认表示整个页面文档",
                    description:"返回元素总高度值",
                    codeValue:`
                        console.log(Qilin.Element.getNodeHeight(parentNode));
                        console.log(Qilin.Element.getNodeHeight());
                        console.log(Qilin.Element.getNodeHeight(".a"));
                        console.log(Qilin.Element.getNodeHeight(".EDGQilin"));
                    `
                },
                {
                    text:"获取某个元素的滚动条在Y轴上滚动的距离:",
                    expression:"Qilin.Element.getNodeScrollTop(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是窗口滚动",
                    description:"返回元素垂直滚动距离",
                    codeValue:`
                        console.log(Qilin.Element.getNodeScrollTop(parentNode));
                        console.log(Qilin.Element.getNodeScrollTop(parentNode.parentNode));
                        console.log(Qilin.Element.getNodeScrollTop(parentNode.parentNode.parentNode));
                        console.log(Qilin.Element.getNodeScrollTop());
                        console.log(Qilin.Element.getNodeScrollTop(".a"));
                        console.log(Qilin.Element.getNodeScrollTop(".EDGQilin"));
                    `
                },
                {
                    text:"获取某个元素的滚动条在X轴上滚动的距离:",
                    expression:"Qilin.Element.getNodeScrollLeft(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是窗口滚动",
                    description:"返回元素水平滚动距离",
                    codeValue:`
                        console.log(Qilin.Element.getNodeScrollLeft(parentNode));
                        console.log(Qilin.Element.getNodeScrollLeft(parentNode.parentNode));
                        console.log(Qilin.Element.getNodeScrollLeft(parentNode.parentNode.parentNode));
                        console.log(Qilin.Element.getNodeScrollLeft());
                        console.log(Qilin.Element.getNodeScrollLeft(".a"));
                        console.log(Qilin.Element.getNodeScrollLeft(".EDGQilin"));
                    `
                },
                {
                    text:"监听某个元素滚动至顶部或底部的事件:",
                    expression:"Qilin.Element.TriggerScrollTopOrBottom(element,callback)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是窗口滚动",
                    description:"无返回值",
                    codeValue:`
                        Qilin.Element.TriggerScrollTopOrBottom(parentNode.parentNode.parentNode,(options)=>{
                            console.log(options);
                        });
                    `
                },
                {
                    text:"设置某个元素在Y轴上的滚动距离:",
                    expression:"Qilin.Element.setNodeScrollTop(element,number,time)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是窗口滚动",
                    description:"返回Promise对象，通过then方法回调，表示设置滚动后的事件",
                    codeValue:`
                        Qilin.Element.setNodeScrollTop(parentNode.parentNode.parentNode,500,20);
                        Qilin.Element.setNodeScrollTop(parentNode.parentNode.parentNode,0,20);
                        Qilin.Element.setNodeScrollTop(parentNode.parentNode.parentNode);
                        Qilin.Element.setNodeScrollTop(parentNode.parentNode.parentNode,500,20).then(()=>{
                            console.log("元素滚动完毕");
                        })
                    `
                },
                {
                    text:"设置某个元素在X轴上的滚动距离:",
                    expression:"Qilin.Element.setNodeScrollLeft(element,number,time)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是窗口滚动",
                    description:"返回Promise对象，通过then方法回调，表示设置滚动后的事件",
                    codeValue:`
                        Qilin.Element.setNodeScrollLeft(null,100,20);
                        Qilin.Element.setNodeScrollLeft(null,100);
                        Qilin.Element.setNodeScrollLeft(null);
                        Qilin.Element.setNodeScrollLeft(null,100,20).then(()=>{
                            console.log("元素滚动完毕");
                        });
                    `
                },
                {
                    text:"获取某个元素距离可视窗口的位置:",
                    expression:"Qilin.Element.getNodeBounding(element)",
                    subText:"element 可以是元素节点也可以是选择器--不传默认是body元素--若存在多个相同的选择器则默认为第一个",
                    description:"返回一个对象--包含距离可视窗口各个位置的距离",
                    codeValue:`
                        console.log(Qilin.Element.getNodeBounding());
                        console.log(Qilin.Element.getNodeBounding(parentNode));
                        console.log(Qilin.Element.getNodeBounding(childNodeA));
                        console.log(Qilin.Element.getNodeBounding(childNodeB));
                        console.log(Qilin.Element.getNodeBounding(".EDGQilin"));
                        console.log(Qilin.Element.getNodeBounding(".qilin-QilinCard"));
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Data方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"获取某个元素上的指定数据:",
                    expression:"Qilin.Data.getNodeData(element,keyName)",
                    subText:"返回数据",
                    codeValue:`
                        console.log(Qilin.Data.getNodeData(parentNode));
                        console.log(Qilin.Data.getNodeData(parentNode,"class"));
                    `
                },
                {
                    text:"在某个元素上绑定数据:",
                    expression:"Qilin.Data.setNodeData(element,keyName,value)",
                    subText:"无返回值",
                    codeValue:`
                        Qilin.Data.setNodeData(parentNode,"name","父组件");
                        Qilin.Data.setNodeData(parentNode,"class","EDGQilin");
                    `
                },
                {
                    text:"判断某个元素上是否绑定指定数据:",
                    expression:"Qilin.Data.hasNodeData(element,keyName)",
                    subText:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Data.hasNodeData(parentNode,"name"));
                    `
                },
                {
                    text:"判断某个元素上是否绑定指定数据:",
                    expression:"Qilin.Data.removeNodeData(element,keyName)",
                    subText:"无返回值",
                    codeValue:`
                        Qilin.Data.removeNodeData(parentNode,"name");
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Common方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"判断某个字符串是否是某种类型:",
                    expression:"Qilin.Common.judgeRegText(text,type)",
                    subText:"如this.Qilin.Common.judgeRegText('我是你爹','Chinese')表示是否是中文",
                    description:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Common.judgeRegText("我是你爹","Chinese")); //true
                        console.log(Qilin.Common.judgeRegText("我是你11爹","Chinese")); //false
                        console.log(Qilin.Common.judgeRegText("我是你爹","chinese")); //true
                        console.log(Qilin.Common.judgeRegText("我是你11爹","chinese")); //true
                        console.log(Qilin.Common.judgeRegText("991137419@qq.com","email")); //true
                        console.log(Qilin.Common.judgeRegText("991137419@qq.c","email")); //false
                        console.log(Qilin.Common.judgeRegText("991137419#qq.c","email")); //false
                        console.log(Qilin.Common.judgeRegText("1234@q.cn","email")); //true
                        console.log(Qilin.Common.judgeRegText("clearlove","userName")); //true
                        console.log(Qilin.Common.judgeRegText("clearlove@","userName")); //false
                        console.log(Qilin.Common.judgeRegText("777","int")); //true
                        console.log(Qilin.Common.judgeRegText("-777","int")); //true
                        console.log(Qilin.Common.judgeRegText("777","int+")); //true
                        console.log(Qilin.Common.judgeRegText("-777","int+")); //false
                        console.log(Qilin.Common.judgeRegText("-777","int-")); //true
                        console.log(Qilin.Common.judgeRegText("777","int-")); //false
                        console.log(Qilin.Common.judgeRegText("123","pos")); //true
                        console.log(Qilin.Common.judgeRegText("123.12","pos")); //true
                        console.log(Qilin.Common.judgeRegText("-123.12","pos")); //false
                        console.log(Qilin.Common.judgeRegText("0.12","pos")); //true
                        console.log(Qilin.Common.judgeRegText(".12","pos")); //false
                        console.log(Qilin.Common.judgeRegText("1","pos")); //true
                        console.log(Qilin.Common.judgeRegText("00","pos")); //true
                        console.log(Qilin.Common.judgeRegText("1","neg")); //false
                        console.log(Qilin.Common.judgeRegText("-1","neg")); //true
                        console.log(Qilin.Common.judgeRegText("-1.23","neg")); //true
                        console.log(Qilin.Common.judgeRegText("-01.23","neg")); //true
                        console.log(Qilin.Common.judgeRegText("-.23","neg")); //false
                        console.log(Qilin.Common.judgeRegText("123","number")); //true
                        console.log(Qilin.Common.judgeRegText("1.23","number")); //true
                        console.log(Qilin.Common.judgeRegText(".23","number")); //false
                        console.log(Qilin.Common.judgeRegText("1","number")); //true
                        console.log(Qilin.Common.judgeRegText("1.","number")); //false
                        console.log(Qilin.Common.judgeRegText("-1.6","number")); //true
                        console.log(Qilin.Common.judgeRegText("-1","number")); //true
                        console.log(Qilin.Common.judgeRegText("18655536329","phone")); //true
                        console.log(Qilin.Common.judgeRegText("1865553632","phone")); //false
                        console.log(Qilin.Common.judgeRegText("186555363299","phone")); //false
                        console.log(Qilin.Common.judgeRegText("340521199605125219","idCard")); //true
                        console.log(Qilin.Common.judgeRegText("34052119960512521X","idCard")); //true
                        console.log(Qilin.Common.judgeRegText("34052119960512521c","idCard")); //false
                        console.log(Qilin.Common.judgeRegText("3405211996051252","idCard")); //false
                        console.log(Qilin.Common.judgeRegText("http://www.baidu.com","url")); //true
                        console.log(Qilin.Common.judgeRegText("http://www.baidu2222.com","url")); //true
                        console.log(Qilin.Common.judgeRegText("https://www.baidu2222.com?name=EDGQilin","url")); //true
                        console.log(Qilin.Common.judgeRegText("http://www.ora.com:80","url")); //true
                        console.log(Qilin.Common.judgeRegText("255.1.1.1","IPv4")); //true
                        console.log(Qilin.Common.judgeRegText("255.1.1.245","IPv4")); //true
                        console.log(Qilin.Common.judgeRegText("255.1.1.256","IPv4")); //false
                        console.log(Qilin.Common.judgeRegText("255.1.1","IPv4")); //false
                        console.log(Qilin.Common.judgeRegText("1.1.1.1","IPv4")); //true
                        console.log(Qilin.Common.judgeRegText("#000","hex")); //true
                        console.log(Qilin.Common.judgeRegText("#ffffff","hex")); //true
                        console.log(Qilin.Common.judgeRegText("red","hex")); //false
                        console.log(Qilin.Common.judgeRegText("2022-10-12","date")); //true
                        console.log(Qilin.Common.judgeRegText("2022/10/12","date")); //true
                        console.log(Qilin.Common.judgeRegText("2022.10.12","date")); //true
                        console.log(Qilin.Common.judgeRegText("2022年10月12日","date")); //true
                        console.log(Qilin.Common.judgeRegText("16:55:55","time")); //true
                        console.log(Qilin.Common.judgeRegText("16:55:67","time")); //false
                        console.log(Qilin.Common.judgeRegText("16:55:00","time")); //true
                        console.log(Qilin.Common.judgeRegText("991137419","QQ")); //true
                        console.log(Qilin.Common.judgeRegText("9911374191","QQ")); //true
                        console.log(Qilin.Common.judgeRegText("123456","QQ")); //true
                        console.log(Qilin.Common.judgeRegText("EDG-Qilin","Wechat")); //true
                        console.log(Qilin.Common.judgeRegText("1234556","Wechat")); //false
                        console.log(Qilin.Common.judgeRegText("皖EZ1238","licensePlate")); //true
                    `
                },
                {
                    text:"判断参数是否是对象:",
                    expression:"Qilin.Common.isObject(object)",
                    subText:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Common.isObject(parentNode));
                        console.log(Qilin.Common.isObject({})); //true
                        console.log(Qilin.Common.isObject([])); //false
                        console.log(Qilin.Common.isObject(null)); //false
                        console.log(Qilin.Common.isObject(new Function())); //false
                        console.log(Qilin.Common.isObject(function(){})); //false
                    `
                },
                {
                    text:"判断参数是否是空:",
                    expression:"Qilin.Common.isEmpty(value)",
                    subText:"null、undefined、{}、[]、''皆表示为空",
                    description:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Common.isEmpty(null)); //true
                        console.log(Qilin.Common.isEmpty()); //true
                        console.log(Qilin.Common.isEmpty(undefined)); //true
                        console.log(Qilin.Common.isEmpty(0)); //false
                        console.log(Qilin.Common.isEmpty(1)); //false
                        console.log(Qilin.Common.isEmpty({})); //true
                        console.log(Qilin.Common.isEmpty([])); //true
                        console.log(Qilin.Common.isEmpty("")); //true
                        console.log(Qilin.Common.isEmpty("  ")); //true
                    `
                },
                {
                    text:"判断参数是否是空对象:",
                    expression:"Qilin.Common.isEmptyObject(object)",
                    subText:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Common.isEmptyObject({})); //true
                        console.log(Qilin.Common.isEmptyObject([])); //false
                        console.log(Qilin.Common.isEmptyObject(null)); //false
                    `
                },
                {
                    text:"根据地址栏url的参数名获取其参数值:",
                    expression:"Qilin.Common.getUrlParamsValue(key,url)",
                    subText:"url 指定url地址，不传默认查当前地址栏中url ",
                    description:"返回参数值",
                    codeValue:`
                        console.log(Qilin.Common.getUrlParamsValue("name","abc.com?name=qilin&age=27")); //qilin
                        console.log(Qilin.Common.getUrlParamsValue("age","abc.com?name=qilin&age=27")); //27
                        console.log(Qilin.Common.getUrlParamsValue("name")); //null
                    `
                },
                {
                    text:"复制指定文本信息-旧:",
                    expression:"Qilin.Common.pasteText(text)",
                    subText:"无返回值",
                    codeValue:`
                        Qilin.Common.pasteText("我是你爹");
                    `
                },
                {
                    text:"复制指定文本信息-新:",
                    expression:"Qilin.Common.newPasteText(text)",
                    subText:"返回Promise对象",
                    codeValue:`
                        // 点击复制按钮事件监听
                        pasteText(){
                            Qilin.Common.pasteText("我是你爹2222");
                            Qilin.Common.newPasteText("天青色等烟雨");
                            Qilin.Common.newPasteText("天青色等烟雨333").then(()=>{
                                console.log("已完成复制操作");
                            });
                        }
                    `
                },
                {
                    text:"对某个数据进行深拷贝操作:",
                    expression:"Qilin.Common.deepCopy(sourceObj,targetObj)",
                    subText:"返回拷贝数据",
                    codeValue:`
                        let obj1={
                            a:1,
                            b:undefined,
                            c:null,
                            d:true,
                            e:[1,2,3],
                            f:{
                                name:"qilin"
                            },
                            g:function(){
                                console.log(111);
                            },
                            h:[
                                {
                                    name:"EDGQilin"
                                }
                            ]
                        };
                        let obj2={};
                        Qilin.Common.deepCopy(obj1,obj2);
                    `
                },
                {
                    text:"获取url地址栏?后面的全部键值对信息",
                    expression:"Qilin.Common.getUrlSearchParamsKeyValue()",
                    subText:"获取url地址栏?后面的全部键值对信息，以数组对象形式返回",
                    codeValue:`
                        console.log(Qilin.Common.getUrlSearchParamsKeyValue());
                    `
                },
                {
                    text:"根据key值获取url地址栏?后面的相对应的值信息",
                    expression:"Qilin.Common.getUrlSearchParamsValue(keyName)",
                    subText:"返回对应值或null",
                    codeValue:`
                        console.log(Qilin.Common.getUrlSearchParamsValue("qilinToken"));
                        console.log(Qilin.Common.getUrlSearchParamsValue("a"));
                    `
                },
                {
                    text:"判断某个元素文本是否溢出",
                    expression:"Qilin.Common.judgeEllipsisText(element)",
                    subText:"返回布尔值",
                    codeValue:`
                        console.log(Qilin.Common.judgeEllipsisText(".cell"));
                    `
                }
            ]
        }
    },
    {
        cardConfig:{
            title:"Qilin工具库Event方法"
        },
        collapseConfig:{
            itemConfig:[
                {
                    text:"给某个元素绑定指定事件:",
                    expression:"Qilin.Event.on(element,eventName,fn,options)",
                    subText:"eventName 事件名称，多个事件名以,分开，.后可接唯一标识；options options等同于原生addEventListener的最后一个参数，是一个对象",
                    description:"无返回值",
                    codeValue:`
                        Qilin.Event.on(parentNode,"click",(e)=>{
                            console.log(this);
                        });
                        Qilin.Event.on(parentNode,"click.my",(e)=>{
                            console.log(this);
                        });
                        Qilin.Event.on(parentNode,"click.qilin",(e)=>{
                            console.log(this);
                        });
                        Qilin.Event.on(parentNode,"click",function(e){
                            console.log(this);
                        });
                    `
                },
                {
                    text:"给某个元素解绑指定事件:",
                    expression:"Qilin.Event.off(element,eventName)",
                    subText:"eventName 事件名称，多个事件名以,分开，.后可接唯一标识；",
                    description:"无返回值",
                    codeValue:`
                        Qilin.Event.on(parentNode,"click,mouseenter",(e)=>{
                            Qilin.Event.off(parentNode);
                            Qilin.Event.off(parentNode,"mouseenter");
                        });
                        Qilin.Event.on(childNodeA,"click.qilin",(e)=>{
                            console.log("点击A元素");
                        });
                        Qilin.Event.on(parentNode,"click",(e)=>{
                            e.preventDefault();
                            console.log("点击父元素");
                            Qilin.Event.off(childNodeA,"click");
                        },{capture:true,once:true,passive:true});
                    `
                }
            ]
        }
    }
]);


/*
    计算属性等代码区域
*/


/*
    逻辑脚本代码区域
*/
// 点击按钮事件监听
const scrollPage=(state)=>{
    // console.log(QilinUtilsRef.value);
    const Distance=Qilin.Element.getNodeHeight(QilinUtilsRef.value.parentNode)-Qilin.Element.getNodeContentHeight(QilinUtilsRef.value.parentNode);
    Qilin.Element.setNodeScrollTop(QilinUtilsRef.value.parentNode,state == "top" ? 0 : Distance,800).then(()=>{
        if(state === "top"){
            console.log("已置顶");
        }else{
            console.log("已至底");
        };
    });
};
const scrollPage1=(state)=>{
    // console.log(QilinUtilsRef.value);
    const Distance=Qilin.Element.getNodeScrollTop(QilinUtilsRef.value.parentNode);
    Qilin.Element.setNodeScrollTop(QilinUtilsRef.value.parentNode,state == "top" ? (Distance-500) : (Distance+500),500).then(()=>{
        if(state === "top"){
            console.log("向上滚动500px");
        }else{
            console.log("向下滚动500px");
        };
    });
};


/*
    生命周期代码区域
*/

</script>

<style lang="scss" scoped>
.qilin-QilinUtils {
    width: 100%;
    padding:0 10px 40px;
    >.qilin-QilinUtils-operate{
        position: fixed;
        bottom: 5%;
        right: 5%;
        z-index:10;
    }
}
</style>
